home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 2002 November / SGI Freeware 2002 November - Disc 2.iso / dist / fw_gimp-print.idb / usr / freeware / bin / gimpprint-config.z / gimpprint-config
Text File  |  2002-10-07  |  1KB  |  94 lines

  1. #!/bin/sh
  2.  
  3. gimpprint_libs="-lgimpprint  -lm"
  4. gimpprint_cflags=""
  5.  
  6. prefix=${ROOT}/usr/freeware
  7. exec_prefix=${prefix}
  8. exec_prefix_set=no
  9.  
  10. usage()
  11. {
  12.     cat <<EOF
  13. Usage: gimpprint-config [OPTIONS] [LIBRARIES]
  14. Options:
  15.     [--prefix[=DIR]]
  16.     [--exec-prefix[=DIR]]
  17.     [--version]
  18.     [--libs]
  19.     [--cflags]
  20. Libraries:
  21.     gimpprint
  22. EOF
  23.     exit $1
  24. }
  25.  
  26. if test $# -eq 0; then
  27.     usage 1 1>&2
  28. fi
  29.  
  30. lib_gimpprint=yes
  31.  
  32. while test $# -gt 0; do
  33.   case "$1" in
  34.   -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
  35.   *) optarg= ;;
  36.   esac
  37.  
  38.   case $1 in
  39.     --prefix=*)
  40.       prefix=$optarg
  41.       if test $exec_prefix_set = no ; then
  42.         exec_prefix=$optarg
  43.       fi
  44.       ;;
  45.     --prefix)
  46.       echo_prefix=yes
  47.       ;;
  48.     --exec-prefix=*)
  49.       exec_prefix=$optarg
  50.       exec_prefix_set=yes
  51.       ;;
  52.     --exec-prefix)
  53.       echo_exec_prefix=yes
  54.       ;;
  55.     --version)
  56.       echo 4.2.2
  57.       ;;
  58.     --cflags)
  59.       echo_cflags=yes
  60.       ;;
  61.     --libs)
  62.       echo_libs=yes
  63.       ;;
  64.     gimpprint)
  65.       lib_gimpprint=yes
  66.       ;;
  67.     *)
  68.       usage 1 1>&2
  69.       ;;
  70.   esac
  71.   shift
  72. done
  73.  
  74. if test "$echo_prefix" = "yes"; then
  75.     echo $prefix
  76. fi
  77.  
  78. if test "$echo_exec_prefix" = "yes"; then
  79.     echo $exec_prefix
  80. fi
  81.  
  82. if test "$echo_cflags" = "yes"; then
  83.       if test ${prefix}/include != /usr/include ; then
  84.         includes=-I${prefix}/include
  85.       fi
  86.       echo $includes $gimpprint_cflags
  87. fi
  88.  
  89. if test "$echo_libs" = "yes"; then
  90.       libdirs=-L${ROOT}/usr/freeware/${ABILIB-lib32}
  91.       echo $libdirs $gimpprint_libs -lintl 
  92. fi
  93.  
  94.